import { stat } from 'fs';
export default class UpswarnData {
    private static _warnInfoMap = {};
    constructor(){
        	
    }
    public static init(){
        for (const arr of this.warnInfoArr) {
            this._warnInfoMap[arr[0]] = arr[1];
        }
    }

    public static getInfo(key:string){
        return this._warnInfoMap[key];
    }

    private static warnInfoArr:string[][] = [["0000","模块BUS高压"],
    ["0001","模块BUS低压"],
    ["0002","模块BUS不平衡"],
    ["0003","模块BUS短路"],
    ["0005","模块BUS软启超时"],
    ["0006","模块逆变软启超时"],
    ["0007","模块逆变高压"],
    ["0008","模块逆变低压"],
    ["0009","模块R相输出短路"],
    ["000A","模块S相输出短路"],
    ["000B","模块T相输出短路"],
    ["000C","模块RS相输出短路"],
    ["000D","模块ST相输出短路"],
    ["000E","模块TR相输出短路"],
    ["000F","模块R相输出负功异常"],
    ["0010","模块S相输出负功异常"],
    ["0011","模块T相输出负功异常"],
    ["0012","模块过载故障"],
    ["0013","模块电池异常"],
    ["0015","模块过温故障"],
    ["0016","模块同步信号故障"],
    ["0017","模块同步脉冲故障"],
    ["0018","模块继电器粘死"],
    ["0039","读写EEROM错误（模块）"],
    ["003A","模块风扇故障"],
    ["003B","市电相序错误（模块）"],
    ["003C","旁路相序错误（模块）"],
    ["003D","N线未接（模块）"],
    ["003E","同步信号故障（模块）"],
    ["003F","同步脉冲故障（模块）"],
    ["0040","市电异常（模块）"],
    ["0041","旁路异常（模块）"],
    ["0042","电池低压（模块）"],
    ["0044","模块未检测到充电器"],
    ["0046","旁路频率异常（模块）"],
    ["0047","输出过压（模块）"],
    ["0048","物理地址冲突（模块）"],
    ["0049","R相PFC异常（模块）"],
    ["004A","S相PFC异常（模块）"],
    ["004B","T相PFC异常（模块）"],
    ["004C","继电器异常（模块）"],
    ["004D","旁路STS异常（模块）"],
    ["0050","电池过充（充电器）"],
    ["0051","电池反接（充电器）"],
    ["0052","电池未接（充电器）"],
    ["0053","充电器异常"],
    ["0054","充电器短路"],
    ["0055","充电器未开"],
    ["0056","充电器自杀"],
    ["0057","充电器通讯异常"],
    ["0058","充电器ID错误"],
    ["0059","LCD掉线（充电器）"],
    ["005A","充电电压设置错误"],
    ["005B","充电电流设置错误"],
    ["005C","紧急关机（充电器）"],
    ["005D","充电器风扇故障"],
    ["005E","市电相序错误（充电器）"],
    ["005F","N线未接（充电器）"]
    ];

}